<template>
  <div class="course-direction">
    <div class="course-direction-title">课程方向</div>
    <div class="course-direction-body">
        <div class="course-direction-item" v-for="(item, key) in directionList" :key=key @click="toGoktechCollege">
            <div class="course-item-icon">
                   <img :src="item.img">
            </div>
            <div class="course-item-text">
                {{item.coursedirection}}
            </div>
        </div>
    </div>
  </div>
</template>

<script>

export default {
  name: 'direction',
  data () {
      return{
        
      }
    
  },
  props: {
    directionList: {
        type: Array,
        required: true
    }
  },
  mounted(){

  },
  components: {
   
  },
  methods:{
    toGoktechCollege(){
        window.open('https://campus.goktech.cn/allCourse')
    } 
  }
}
</script>

<style lang="stylus" scoped>
.course-direction{
    background:rgba(255,255,255,1);
    box-shadow:0px 1px 2px 0px rgba(0,0,0,0.1);
    margin-bottom: 20px; 
}
.course-direction-title{
    box-sizing: border-box;
    font-size:16px;
    color:rgba(30,30,30,1);
    padding-left: 30px;
    line-height:58px;
    border-bottom: 1px solid rgba(238,238,238,1);
}
.course-direction-body{
    padding: 40px 30px;
    font-size: 0;
    .course-direction-item{
        display: inline-block;
        width:146px;
        height:146px;
        margin-right: 41px;
        margin-bottom: 40px;
        cursor: pointer;
        &:hover{
            background:rgba(245,245,245,1);
        } 
        .course-item-icon{
            
            text-align: center;
            margin-top: 38px;
            img{
                width: 36px;
                height: 36px;
            }
        }
        .course-item-text{
            font-size:14px;
            color:rgba(30,30,30,1);
            text-align: center;
            margin-top: 15px;    
        }
    }
    .course-direction-item:nth-child(5n){
        margin-right: 0;
    }
}

</style>
